package com.gujia.concurrency.example.immutable;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * final  不可执行另一个对象，对象里面的值可以修改
 */
public class ImmutableExample1 {


    private final static Integer a = 1;
    private final static  String b = "2";
    private final static Map<Integer,Integer> map = Maps.newHashMap();

    static {
        map.put(1,2);
        map.put(3,4);
        map.put(5,6);
    }

    public static void main(String[] args) {
        //a =3 ;
        //b="3";
       // map = Maps.newHashMap();
        map.put(1,3);


    }

    public void test(final int a ){
       // a = 2;
    }
}
